The present invention relates to the field of Internet information appliances and more particularly to a method and apparatus for running a plurality of applications on such appliances in a platform independent environment.
Traditionally, software applications have been built for a particular operating system working with a particular configuration of computer hardware e.g. WORDPERFECT for WINDOWS 95 operations on an IBM (or clone) computer with a PENTIUM chip integral to the motherboard. This system dependent programming resulted in applications which required significant programming code and storage space on a hard drive or similar storage medium to warehouse the application. In an attempt to move away from a dependency on a particular hardware and operating system configuration, the JAVA programming language was developed. JAVA allows applications to be run on any hardware platform without having to be rewritten or recompiled by the programmer for each separate platform. Further, JAVA can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network such as the Internet. The programs created using JAVA are portable in a network meaning that once the program is compiled into JAVA bytecode it can be run anywhere in a network on a server or client that has a JAVA interpreter or JAVA virtual machine (JVM). The JVM is an abstract computer (i.e. actually a software layer) that provides an interface between compiled JAVA binary code and the hardware platform which actually performs the programs instructions. Once a JVM has been provided for a platform, any JAVA program can run on the platform. Diagrammatically, this can be described as shown in FIG. 1.
JAVA is an object-oriented programming language which means, among other characteristics, that similar objects can take advantage of being part of the same class and inherit common code. An object is what is actually run in the computer. It contains programming code (sequences of computer instructions) and data (information which the instructions operate on). Traditionally, code and data have been kept apart (e.g. In the C language, units of code are called functions, while units of data are called structures. Functions can operate on more than one type of structure, and more than one function can operate on the same structure). All communication to an object is done via messages which define the interface to the object i.e. the internal data and code of the object cannot be accessed directly. An object is defined by its class, with a class being a template definition of the methods and variables in a particular kind of object. Objects are individual instances of a class, containing real values instead of variables. Each object is made into a generic class of objects and even more generic classes are defined so that objects can share models and reuse the class definitions in their code. Variables are data types which are not assigned a constant value, while a method is the action or programmed procedure that a message carries out. A method is defined as part of a class and included in any object of that class. The object""s methods are designed to handle the actual values that are supplied to the object when the object is being used. Arguments are often supplied as part of a message. For example, consider the following example expressed in SMALLTALK, an object-oriented programming language similar to JAVA:
a:=1.
b:=2.
c.:=a+b
In this example, the code specifies: xe2x80x9cTake object a, which has a value of 1, and send it the message xe2x80x9c+xe2x80x9d, which included the argument b, which in turn, has the value 2. Object a, receives this message and performs the action requested, which is to add the value of the argument to itself. Create a new object, give this the result 3, and assign this object to c.xe2x80x9d
JAVA code is robust meaning that JAVA objects contain no references to data external to themselves or other known objects. This ensures that an instruction cannot contain the address of data stored in another application or in the operating system itself, either of which could cause the program to crash, in the event that such data was inaccessible. In JAVA programming, there are application programs and compact programs called applets. An application program is a program designed to perform a specific function directly for the user or, in some cases, for another application program (e.g. word processors, Web browsers, etc.). Applications use the services of the computer""s operating system and other supporting applications. The formal requests and means of communicating with other programs that an application program uses is called the application program interface (API). On the other hand, an applet is a small program that can be sent along with a Web page to a user. JAVA applets can perform interactive animations, immediate calculations, or other simple tasks without having to send a user request back to the server. Web browsers that support JAVA are able to download the applet to the user""s hardware and then execute it i.e. the executable software is downloaded when you need it and then discarded when the program has been executed.
Practically speaking, the major software manufactures have built a JVM into their operating systems and/or Web browsers to allow JAVA applications or applets to run e.g. a WINDOWS machine will have a JAVA interpreter for the WINDOWS/INTEL/IBM environment, an APPLE MAC will have a MAC-JAVA interpreter, etc. An example of such software would be the web browser NETSCAPE.
Presently, when a user desires to use multiple JAVA applications they must invoke separate JAVA interpreters. As shown in FIG. 2, in the traditional model each JAVA application has its own associated JVM which must be run (instantiated) as a system process to run the application with which it is associated. This is considered inefficient because the applications must share the same memory and other resources of the information appliance in which they are operating. Further, each application runs independent of the other resulting in inefficient inter-application communication. Instead of being able to communicate at the application level, virtual communication paths must be created which engage the Operating Systems level. As a result, the manner in which applications communicate is very system dependent. A diagrammatic view of this traditional configuration is shown at FIG. 3.
The present invention seeks to overcome the disadvantages of the prior art by providing an embedded desktop which can run multiple applications simultaneously under one instance of a JVM and which allows open applications to communicate with one another in a system independent manner.
In accordance with one aspect of the present invention, there is provided a computer implemented method of running multiple JAVA applications under one instance of a JAVA Virtual Machine comprising the steps of: invoking a system class loader when the JAVA Virtual Machine is launched; launching an embedded desktop comprising a core and at least a service vendor plug-in, wherein the embedded desktop communicates with the JAVA Virtual Machine and each of the multiple JAVA applications, receiving a request into the core to launch one of the multiple JAVA applications; retrieving into the core class files associated with the requested JAVA application; invoking an application class loader corresponding to the requested JAVA application; hooking the application class loader into the system class loader; opening the requested JAVA application; updating an open application list after the requested JAVA application is opened.
In accordance with another aspect of the present invention there is provided in a computer comprising storage means, input means, a central processing unit, an operating system and a JAVA Virtual Machine, an embedded desktop for running a plurality JAVA applications under one instance of said JAVA Virtual Machine, the embedded desktop stored in the storage means and comprising at least: a core; and a service vendor plug-in communicating with the core; wherein the embedded desktop communicates with the JAVA Virtual Machine and the plurality of JAVA applications, each of the plurality of JAVA applications containing class files; and wherein a system class loader is invoked when the JAVA Virtual Machine is launched; and wherein an application class loader is invoked when each of the plurality of JAVA applications is launched, using the respective class files of each of the plurality of JAVA applications; and wherein the application class loader is hooked to the system class loader; and wherein an open application list is updated after each of the plurality of JAVA applications is launched.
In yet another aspect of the present invention there is provided a method for allowing a plurality of JAVA applications running under one instance of a JAVA Virtual Machine to communicate with each other in a system independent manner comprising the steps of: invoking a system class loader when the JAVA Virtual Machine is launched; launching an embedded desktop comprising a core and at least a service vendor plug-in, wherein the embedded desktop communicates with a JAVA Virtual Machine and a plurality of JAVA applications; invoking a respective application class loader when each of the plurality of JAVA applications is launched; receiving a request into the core from one of the application class loaders; polling each of the applications; and presenting the results of the poll to the requesting application class loader.